using System;
using log4net;
using Microsoft.AspNetCore.Mvc;
using Suk.Interface.Admin;
using Suk.Models.Admin;

namespace Suk.Web.Areas.Admin.Controllers
{

    [Area("Admin")]
    public class MenuController : SUBaseController<IMenuInterface, Menu>
    {

      //  public ILog Log { get; set; }
        public JsonResult FindMenu()
        {
            IMenuInterface s= Startup.GetFromFac<IMenuInterface>();
            IMenuInterface s1 = Startup.GetFromFac<IMenuInterface>();
            string guid = s.GetGuid().ToString();
            string guid1 = s1.GetGuid().ToString();
            string guid2 = _IService.GetGuid().ToString();
            _log.Error("guid:"+ guid);
            _log.Info("guid:" + guid);

            var data = _IService.FindMenu();
            return Json(data);
        }
        public JsonResult MenuGroupRelationUpdate(Menu model)
        {
            int data = _IService.MenuGroupRelationUpdate(model);
            return Json(data);
        }

    }
}
